package com.CurrentThread;

//通过CurrentThread方法可以获取当前线程的对象，也可以获取对象的线程名
public class CurrentThread implements Runnable {

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + "执行了" + i + "次");
        }
    }
}
